package com.java.string;

/**
 * 字符串拼接原理
 */
public class StringSplic {
    public static void main(String[] args) {
        String str1 = "a" + "b" + "c";
        String str2 = "abc";
        
        String str3 = "a";
        String str4 = "b";
        String str5 = str3 + str4 + "c";
        
        System.out.println(str1 == str5); // false
        System.out.println(str1 == str2); // true
    }
}
